home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -readerstuff- / pete_sullivan / installme1st / installvc1 < prev    next >
Text File  |  1999-04-21  |  7KB  |  291 lines

  1. ;**************************************************
  2. ;
  3. ;$VER: VitalConnectv2.0 (June 1998
  4. ;
  5. ; Title:
  6. ;    VitalConnect Installer
  7. ; Description:
  8. ;    The Commodore Installer Script for VitalConnect
  9. ;
  10. ; Installer script by Pete Sullivan
  11. ;
  12. ;**************************************************
  13.  
  14. (set true 1)
  15. (set false 0)
  16. (set quote "\"")
  17. (set nothing "")
  18. (set WB2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  19.  
  20. (set VitalConnect_dir (getassign "VitalConnect"))
  21. (set c_dir (getassign "C"))
  22. (set libs_dir (getassign "LIBS"))
  23. (set fonts_dir (getassign "FONTS"))
  24. (set devs_dir (getassign "DEVS"))
  25. (set s_dir (getassign "S"))
  26. (set wbstartup_dir (getassign "SYS:WBSTARTUP"))
  27.  
  28. (set Src_root "")
  29. (set Src_c "c/")
  30. (set Src_s "s/")
  31. (set Src_libs "libs/")
  32. (set Src_devs "devs/")
  33. (set Src_rexx "rexx/")
  34. (set Src_DATA "DATA/")
  35. (set Src_Sullitech "/")
  36. (set Src_docs "Docs/")
  37. (set Src_fonts "Fonts/")
  38. (set Src_WBStartup "WBStartup/")
  39. (set Src_AmiFTP "AmiFTP/")
  40. (set Temp_dir "ram:t/")
  41.  
  42. (set MSG_CopyDevs1 "\n\nCopying needed device ")
  43. (set MSG_CopyDevs2 " to DEVS:")
  44.  
  45. ; start with not updated software!
  46.  
  47. (set is_update false)
  48.  
  49. (if  (<> VitalConnect_dir nothing)
  50.      (if  (askbool
  51.                (prompt "\n\n\nAn earlier version of VitalConnect already exists in"
  52.                " your drawer named: \n\n"
  53.                quote VitalConnect_dir quote
  54.                "\n\nDo you want the update installed over it?")
  55.                (help
  56.                "\n\n\nThe installer has determined that you already have a "
  57.                "some version of the VitalConnect software installed "
  58.                "on your system.  If this is wrong or you want the update "
  59.                "installed elsewhere, select 'NO', otherwise select 'YES'."
  60.                )
  61.                (default 1)
  62.           )
  63.                (set is_update true) 
  64.  
  65. ;else ask where to put software
  66.  
  67.                (
  68.                (set VitalConnect_dir
  69.                (askdir
  70.                     (prompt "Where would you like the updated software "
  71.                     "installed?\n"
  72.                     "The directory 'VitalConnect' will be created automatically.\n")
  73.                     (help @askdir-help)
  74.                     (default @default-dest)
  75.                )
  76.                )
  77.  
  78.                (set VitalConnect_dir
  79.                (tackon VitalConnect_dir "VitalConnect")
  80.                )
  81.  
  82.                (makedir VitalConnect_dir
  83.                (infos)
  84.                )
  85.           )
  86.      )
  87. )
  88.  
  89. ; VitalConnect: was not previously assigned, so ask where to make it
  90. (if  (= VitalConnect_dir nothing)
  91.           (
  92.           (set VitalConnect_dir
  93.                (askdir
  94.                     (prompt "Where would you like the software installed?\n"
  95.                     "The directory 'VitalConnect' will be created automatically.\n")
  96.                     (help @askdir-help)
  97.                     (default @default-dest)
  98.                )
  99.           )
  100.  
  101.           (set VitalConnect_dir
  102.           (tackon VitalConnect_dir "VitalConnect")
  103.           )
  104.  
  105.  
  106.           (makedir VitalConnect_dir
  107.           (infos)
  108.           )
  109.      )
  110. )
  111.  
  112. (set @default-dest VitalConnect_dir)
  113.  
  114. (complete 5)
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.    
  129.  
  130.  
  131. (working omp "...Please Wait...")
  132.  
  133. (copyfiles
  134.      (prompt "Select file(s) to be copied into your WBStartup: directory:")
  135.      (help "\n\n\n\n\nThis will copy the NetStart facility to your WBStartup: "
  136.      "directory.\n\n\n\n\n\n\n\n"
  137.      @copyfiles-help)
  138.      (source Src_root)
  139.      (dest "SYS:WBStartup")
  140.      (pattern "(IconDock3|IconDock3.info)")
  141.      
  142. )
  143.    
  144. (complete 20)
  145.  
  146. (working omp "...Please Wait...")
  147.  
  148. ;copy Cando.library
  149.  
  150. (copylib
  151.    (source (tackon Src_libs "cando.library"))
  152.    (dest "LIBS:")
  153.    (prompt "Copying needed 'Cando.library' to LIBS:")
  154.    (help @copylib-help)
  155.    
  156. )
  157.  
  158. (complete 30)
  159.  
  160.  
  161.  
  162. ; Copy SulliTech
  163.  
  164. (working omp "...Please Wait...")
  165.    
  166. (set VitalConnect_dir
  167.      (copyfiles
  168.           (prompt "These files will be copied to the VitalConnect: directory:")
  169.           (help "\n\n\n\n\n\nThis will copy VitalConnect's main "
  170.           "programs.\n\n\n\n\n\n\n"
  171.           @copyfiles-help)
  172.           (source Src_root)
  173.           (dest VitalConnect_dir)
  174.           (pattern "(#?IconDock|IconDock.info|IconDock2|IconDock2.info|Shrink|Shrink3|Shrink4|IconDock3|IconDock3.info|IconDock4|IconDock4.info|Sullitech|IconVert|About|Sullot|ReadMe|Readme.info|VCInfo|QuickStart|QuickStart.info#?)")
  175.           
  176. )
  177.  
  178.  
  179. )
  180.  
  181.  
  182. (complete 50)
  183.  
  184. ;create Documentation directory
  185.  
  186. (set Docs_dir
  187. (cat VitalConnect_dir)
  188. )
  189. (set Docs_dir
  190. (tackon Docs_dir "Docs")
  191. )
  192.  
  193. (makedir Docs_dir
  194. (infos)
  195. )
  196.  
  197. (working omp "...Please Wait...")
  198.  
  199. (copyfiles
  200.      (prompt "Select file(s) to be copied to the VitalConnect:Docs directory:")
  201.      (help "\n\n\n\n\nThis will copy the HTML documentation for "
  202.      "VitalConnect.  This documentation should reside in your "
  203.      "'VitalConnect:Docs' directory.\n\n\n\n\n\n"
  204.      @copyfiles-help)
  205.      (source Src_Docs)
  206.      (dest Docs_dir)
  207.      (pattern "#?vc#?")
  208.      
  209.  
  210. )
  211.  
  212. (complete 60)
  213.  
  214. ;create Rexx directory
  215.  
  216. (set Rexx_dir
  217. (cat VitalConnect_dir)
  218. )
  219. (set Rexx_dir
  220. (tackon Rexx_dir "Rexx")
  221. )
  222.  
  223. (makedir Rexx_dir
  224. (infos)
  225. )
  226.  
  227. (working omp "...Please Wait...")
  228.  
  229. (copyfiles
  230.      (prompt "These file(s) must be copied into the Rexx directory:")
  231.      (help "\n\n\n\nRexxMast MUST be running on your system for "
  232.      "VitalConnect to use.  These AREXX scripts should reside in your "
  233.      "'VitalConnect:Rexx' directory.\n\n\n\n\n\n"
  234.      @copyfiles-help)
  235.      (source Src_Rexx)
  236.      (dest Rexx_dir)
  237.      (pattern "#?rx#?")
  238.      
  239. )
  240.  
  241. (complete 70)
  242.  
  243. ; add assigns to User-Startup if this is not an update
  244.  
  245. (if  (= is_update false)
  246.      (if  (askbool
  247.                (prompt "\nIn order for VitalConnect to work correctly, "
  248.                "Somewhere in the USER-STARTUP must be an assigment"
  249.                " for 'VitalConnect:'\n\n"
  250.                "These lines can be added for you automatically by this "
  251.                "installer.  Would you like these lines added? \n\n"
  252.                "  assign VitalConnect: "VitalConnect_dir)
  253.                (help @askbool-help)
  254.                )
  255.  
  256.                (
  257.                     (if (= @pretend 0)
  258.                     (
  259.                         (
  260.                         (if  (not  (exists "s:user-startup"))
  261.                              (textfile
  262.                              (dest "s:user-startup")
  263.                              (append ";user-startup \n\n")
  264.                          )
  265.                     )
  266.                     (textfile
  267.                     (dest "ram:user-startup")
  268.                     (include "s:user-startup")
  269.                     (append ";BEGIN VitalConnect assignment\n")
  270.                     (append "assign VitalConnect: " VitalConnect_dir)
  271.                     (append "\n;END VitalConnect assignment\n")
  272.                     )
  273.                     (rename "s:user-startup" "s:user-startup.old")
  274.                     (copyfiles
  275.                     (help @copyfiles-help)
  276.                     (source "ram:user-startup")
  277.                     (dest "s:")
  278.                     )
  279.                     (delete "ram:user-startup")
  280.                )
  281.           )
  282.           )
  283.      )
  284.      )
  285. )
  286.  
  287. (complete 60)
  288.  
  289. (exit)
  290.